package com.example.androidlearn.persistence;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.androidlearn.R;

public class MydatabaseHelper extends AppCompatActivity {
    private MydatabaseHelperExample mydatabaseHelperExample;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_mydatabase_helper);

        mydatabaseHelperExample = new MydatabaseHelperExample(this, "BookSoreNew.db", null, 1);
        Button button = (Button) findViewById(R.id.createdatabase);

        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mydatabaseHelperExample.getWritableDatabase();
            }
        });
    }
}